package com.onesports.intelligent.k12.polarlight.common.domain.dto;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasePagerDTO {

    @ApiModelProperty(value = "当前页，默认第一页")
    private Integer currPage = 1;

    @ApiModelProperty(value = "每页记录数，默认为10")
    private Integer size = 10;

    @ApiModelProperty(hidden = true)
    public Page getPager() {
        return new Page(this.getCurrPage(), this.getSize());
    }


}
